package deckbuilder;

public class Card 
{
	String term;
	String definition;
	
	public Card()
	{
		term = "";
		definition = "";
	}
	
	public Card(String a, String b)
	{
		term = a;
		definition = b;
	}
	
	public void setTerm(String t)
	{
		term = t;
	}
	
	public void setDefinition(String d)
	{
		definition = d;
	}
	
	public String getTerm()
	{
		return term;
	}
	
	public String getDefinition()
	{
		return definition;
	}
	
	
	public String getOtherPart(String given)
	{
		if(given.equals(term))
		{
			return definition;
		}
		else if(given.equals(definition))
		{
			return term;
		}
		else
		{
			return "An Error has occured; the given part does not match either side of this card";
		}
	}
}
